inform() Method |
This method displays information messages that confirm successful validations and process completions.
Syntax
application.inform(sMessage,[sTitle],[oControl],[oFeedbackObject]);
Parameters
Parameter |
Description |
---|---|
sMessage |
Required. String that denotes the information message to be displayed. |
sTitle |
Optional. String that denotes the title of the information message. |
oControl |
Optional. An HTML object that refers to the control for which the information message is issued. When specified for a control, the information message is positioned near the control, instead of being stacked with other information messages. |
oFeedbackObject |
Optional. A JavaScript object that helps convert the information message description into a hyperlink. Clicking the description opens the detailed message in a separate window. This object comprises the following properties:
|
Return Value
It does not return a value.
Remarks
You must provide the textual content to be displayed as the information message. The message displays buttons that enable the user to close them and automatically fade out after an interval of five seconds.
In the case of controls, information message appear as validation messages. In the case of application windows, information messages are stacked on the window from which they originate.
Example
The following example demonstrates how to display stacked information messages.
function showStackedInformation() { var feedbackObject = new Object(); // inputName is the Id of html Element. feedbackObject.relatedHTMLElement = document.getElementById("inputName"); feedbackObject.callbackFunction = callbackHandler; feedbackObject.applicationDefinition = newApplication.documentElement; application.inform("Click Here to execute the callback function.", "Test", null, feedbackObject); } function callbackHandler() { // the code to be executed when the information-message link is clicked. } <script type= "cordys/xml" id="newApplication"> <Application> <url>Application URL </url> <id>Application Id</id> <caption>Application caption</caption> <description>Application description</description> <frame>main</frame> <data/> </Application> </scipt> <html> <body> <div> <label>Name:<label><inputid="inputName" class="input" type="text"> </div> </body> </html>
The following example demonstrates how to display a information message for an HTML element.
function showInformationNearInput() { var feedbackObject = new Object(); // inputName is the Id of html Element. feedbackObject.relatedHTMLElement = document.getElementById("inputName"); feedbackObject.callbackFunction = callbackHandler; feedbackObject.applicationDefinition = newApplication.documentElement; application.inform("Click here to execute the callback function.", "Test", document.getElementById("inputName"), feedbackObject); } function callbackHandler() { // the code to be executed when the information-message link is clicked. } <script type= "cordys/xml" id="newApplication"> <Application> <url>Application URL </url> <id>Application Id</id> <caption>Application caption</caption> <description>Application description</description> <frame>main</frame> <data/> </Application> </script> <html> <body> <div> <label>Name :</label><input id="inputName" class="input" type="text"/> </div> </body> </html>